Skip to content

fix: avoid the "Source ID N was not found" GLib critical when an Inpu… - #19

Merged
ctrondlp merged 1 commit into
mainfrom
P2-release-0.8.0
Oct 21, 2026
Merged

ctrondlp merged 1 commit into
mainfrom
P2-release-0.8.0

Conversation

@ctrondlp

@ctrondlp ctrondlp commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

…tCapture signal and the timeout deadline fall in one poll — on_timeout's source is de-registered by whether it ran, not by whether the wait timed out — and install attrs/jinja2 into the setup-python so the libei-from-source CI build finds them; release 0.8.0

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of malformed portal signals with clearer typed errors and validation details.
    • Fixed a race condition when signals arrive at the same time as timeouts or session closure, ensuring the first valid outcome is preserved.
  • Release

    • Updated the project to Beta version 0.8.0.
  • Documentation

    • Updated the changelog, README, and developer verification guide for version 0.8.0.

…tCapture signal and the timeout deadline fall in one poll — on_timeout's source is de-registered by whether it ran, not by whether the wait timed out — and install attrs/jinja2 into the setup-python so the libei-from-source CI build finds them; release 0.8.0
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: ctrondlp/python-libei/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c5b5b073-6400-4b82-8a28-9c454cf70bf1
📥 Commits

Reviewing files that changed from the base of the PR and between c409644 and afa7d09.

📒 Files selected for processing: 9
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • README.md
  • docs/developers/verification.md
  • pyproject.toml
  • src/libei/__init__.py
  • src/libei/portal.py
  • tests/test_inputcapture.py
  • tests/test_portal.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The changes update timeout handling and its regression tests, revise project and package version references to 0.8.0, add a changelog heading, and install two Python dependencies in the CI build job.

Changes: Portal timeout handling

Layer / File(s) Summary
Timeout tracking and regression coverage
src/libei/portal.py, tests/test_portal.py, tests/test_inputcapture.py
The signal wait tracks whether the timeout callback ran separately from whether the wait timed out. The fake main loop can inject a signal before the timeout callback. The regression test checks that activation wins and the timeout source is not removed twice. The payload documentation clarifies session filtering for malformed signals.

Version 0.8.0

Layer / File(s) Summary
Release version references
pyproject.toml, src/libei/__init__.py, README.md, docs/developers/verification.md, CHANGELOG.md
The project and package versions and documented beta versions change from 0.7.0 to 0.8.0. The changelog adds a 0.8.0 heading dated 2026-10-20.

CI build dependencies

Layer / File(s) Summary
Python dependency installation
.github/workflows/ci.yml
The libei-floor job installs attrs and jinja2 with the configured Python interpreter while retaining the existing apt packages.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to afa7d

The simultaneous signal-and-timeout case avoids redundant source removal. No issue identified here needs to block merging.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main fix: preventing the GLib "Source ID N was not found" critical during InputCapture signal and timeout handling.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ctrondlp
ctrondlp merged commit d312a40 into main Oct 21, 2026
9 checks passed
@ctrondlp
ctrondlp deleted the P2-release-0.8.0 branch October 21, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant